<template>
  <!--  搜索 -->
  <div>
    <!-- 头部 -->
    <div id="top1">
      <h2>商品搜索</h2>
      <p>
        <span class="iconfont">&#xe64a;</span>
        <span class="iconfont">&#xe614;</span>
        <i class="line"></i>
      </p>
      <input type="text" name="usename" placeholder="请输入关键字" />
      <b class="iconfont">&#xe626;</b>
    </div>
    <ul class="search_shop">
      <li>
        <img src="../../assets/img/shopBG1.png" alt="" />
        <p class="search_p">
          <span class="bjb">笔记本</span>
          <span class="sprice1">￥5000</span>
          <span class="pl1">评论3655</span>
        </p>
      </li>
      <li>
        <img src="../../assets/img/shopBG2.png" alt="" />
        <p class="search_p">
          <span class="bjb">笔记本</span>
          <span class="sprice1">￥5000</span>
          <span class="pl1">评论3655</span>
        </p>
      </li>
      <li>
        <img src="../../assets/img/shopBG3.png" alt="" />
        <p class="search_p">
          <span class="bjb">笔记本</span>
          <span class="sprice1">￥5000</span>
          <span class="pl1">评论3655</span>
        </p>
      </li>
    </ul>
  </div>
</template>

<script>
import { search } from "../../utils/api";
export default {
  mounted() {
    search({ keywords: "笔记本" }).then((res) => {
      console.log(res);
    });
  },
};
</script>

<style scoped>
body,
html {
  height: 100vh;
}
body {
  display: flex;
  flex-direction: column;
  max-width: 7.5rem;
  margin: 0 auto;
}
#top1 {
  height: 1.64rem;
  padding: 0.32rem 0.12rem 0.32rem 0.34rem;
  background: #ff6640;
}
#top1 h2 {
  width: 1.4rem;
  height: 0.34rem;
  font-size: 0.32rem;
  line-height: 0.64rem;
  text-align: center;
  color: #ffdfd8;
  margin-top: 0.1rem;
  margin-left: 3rem;
}
#top1 p {
  width: 1.74rem;
  height: 0.6rem;
  border: 1px solid #ff8a6f;
  box-sizing: border-box;
  border-radius: 0.54rem;
  display: flex;
  position: relative;
  margin-top: -0.44rem;
  margin-left: 5.3rem;
  color: #e6e6e6;
}
#top1 p span {
  width: 50%;
  height: 100%;
  text-align: center;
  line-height: 0.64rem;
}
#top1 p .line {
  width: 1px;
  height: 0.37rem;
  background: #ff896e;
  position: absolute;
  top: 0.12rem;
  left: 0.86rem;
}
#top1 input {
  display: block;
  width: 6rem;
  height: 0.65rem;
  border: 0.02rem solid #e6e6e6;
  border-radius: 0.05rem;
  box-sizing: border-box;
  font-size: 0.26rem;
  color: #999;
  margin: 0.4rem 0.2rem 0.2rem 0.45rem;
  padding-left: 0.5rem;
}
#top1 b.iconfont {
  font-size: 0.32rem;
  color: #999;
  vertical-align: top;
  position: absolute;
  left: 0.85rem;
  top: 1.46rem;
}
.search_shop {
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 2rem;
}
.search_shop li {
  height: 2rem;
  border-bottom: 1px solid #ccc;
  padding: 0.3rem 0 0.3rem 0.4rem;
}
.search_shop li img {
  margin-left: 0.15rem;
  float: left;
  height: 1.5rem;
}
.search_shop li .search_p {
  float: left;
  flex: 1;
  margin-left: 0.3rem;
  height: 2rem;
}
.search_shop li .search_p span {
  display: block;
  font-size: 0.3rem;
  color: #ccc;
  margin: 0.12rem 0;
}
.search_shop li .search_p .bjb {
  color: #333;
}
.search_shop li .search_p .pl1 {
  color: rgb(196, 59, 59);
}
</style>